package com.woniuxy.income.service.impl;

import com.woniuxy.core.model.Result;
import com.woniuxy.income.dao.RentersIncome;
import com.woniuxy.income.feign.OrderClient;
import com.woniuxy.income.mapper.RentersIncomeMapper;
import com.woniuxy.income.service.RentersIncomeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 凌玉春
 * @since 2024年01月15日
 */
@Service
public class RentersIncomeServiceImpl extends ServiceImpl<RentersIncomeMapper, RentersIncome> implements RentersIncomeService {
    @Autowired
    private RentersIncomeMapper rentersIncomeMapper;
    @Autowired
    private OrderClient orderClient;

    @Override
    public String renterGetTodayInCome(Integer renterId) {
        Result<String> result=orderClient.renterGetTodayInCome(renterId);
        String income = result.getData();
        return income;
    }

    @Override
    public String renterGetMonthInCome(Integer renterId) {
        Result<String> result=orderClient.renterGetMonthInCome(renterId);
        String income = result.getData();
        return income;
    }
}
